
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>图片加载详解 · Aivin开发笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Aivin">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-local-video/video-js.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="WebView详解.html" />
    
    
    <link rel="prev" href="屏幕适配.html" />
    

    
        <link rel="shortcut icon" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../../assets/images/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    首页
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../doc/常用网站.html">
            
                <a href="../doc/常用网站.html">
            
                    
                    常用网站
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../常用软件/常用软件和框架.html">
            
                <a href="../常用软件/常用软件和框架.html">
            
                    
                    常用软件和框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../doc/开发规范.html">
            
                <a href="../doc/开发规范.html">
            
                    
                    开发规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../doc/开源软件.html">
            
                <a href="../doc/开源软件.html">
            
                    
                    开源软件和框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../doc/Android常用代码.html">
            
                <a href="../doc/Android常用代码.html">
            
                    
                    Android常用代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../源码阅读/源码阅读配置.html">
            
                <a href="../源码阅读/源码阅读配置.html">
            
                    
                    源码阅读
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../源码阅读/其他框架源码.html">
            
                <a href="../源码阅读/其他框架源码.html">
            
                    
                    其他框架源码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../产品经理/产品经理.html">
            
                <a href="../产品经理/产品经理.html">
            
                    
                    产品经理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../设计模式/设计模式.html">
            
                <a href="../设计模式/设计模式.html">
            
                    
                    设计模式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../设计模式/设计模式.html">
            
                <a href="../设计模式/设计模式.html">
            
                    
                    设计模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../设计模式/模式详解.html">
            
                <a href="../设计模式/模式详解.html">
            
                    
                    模式详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../设计模式/mvc等.html">
            
                <a href="../设计模式/mvc等.html">
            
                    
                    mvc等
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../数据结构/常用数据结构.html">
            
                <a href="../数据结构/常用数据结构.html">
            
                    
                    基本算法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" data-path="../数据结构/常用数据结构.html">
            
                <a href="../数据结构/常用数据结构.html">
            
                    
                    常用数据结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" data-path="../常用算法/算法术语.html">
            
                <a href="../常用算法/算法术语.html">
            
                    
                    算法术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" data-path="../常用算法/排序算法.html">
            
                <a href="../常用算法/排序算法.html">
            
                    
                    排序算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" data-path="../常用算法/查找算法.html">
            
                <a href="../常用算法/查找算法.html">
            
                    
                    查找算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" data-path="../常用算法/大数相加.html">
            
                <a href="../常用算法/大数相加.html">
            
                    
                    大数相加
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" data-path="../常用算法/集合的所有子集.html">
            
                <a href="../常用算法/集合的所有子集.html">
            
                    
                    获得集合的所有子集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" data-path="../常用算法/扫描线种子填充算法.html">
            
                <a href="../常用算法/扫描线种子填充算法.html">
            
                    
                    扫描线种子填充算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.8" data-path="../常用算法/其他算法.html">
            
                <a href="../常用算法/其他算法.html">
            
                    
                    其他算法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../java基础/原码补码反码.html">
            
                <a href="../java基础/原码补码反码.html">
            
                    
                    Java部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../java基础/原码补码反码.html">
            
                <a href="../java基础/原码补码反码.html">
            
                    
                    原码补码反码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../java基础/java常用代码.html">
            
                <a href="../java基础/java常用代码.html">
            
                    
                    java常用代码
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.3" data-path="../java基础/JVM详解.html">
            
                <a href="../java基础/JVM详解.html">
            
                    
                    JVM详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.4" data-path="../java基础/类加载机制.html">
            
                <a href="../java基础/类加载机制.html">
            
                    
                    类加载机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.5" data-path="../java基础/内存模型.html">
            
                <a href="../java基础/内存模型.html">
            
                    
                    内存模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.6" data-path="../java基础/GC机制.html">
            
                <a href="../java基础/GC机制.html">
            
                    
                    GC机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.7" data-path="../java基础/对象内存布局.html">
            
                <a href="../java基础/对象内存布局.html">
            
                    
                    对象内存布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.8" data-path="../java基础/继承多态.html">
            
                <a href="../java基础/继承多态.html">
            
                    
                    继承和多态
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.9" data-path="../java基础/相等判断.html">
            
                <a href="../java基础/相等判断.html">
            
                    
                    相等判断
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.10" data-path="../java基础/Java容器类.html">
            
                <a href="../java基础/Java容器类.html">
            
                    
                    Java容器类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.11" data-path="../java基础/Java枚举.html">
            
                <a href="../java基础/Java枚举.html">
            
                    
                    Java枚举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.12" data-path="../java基础/自定义异常.html">
            
                <a href="../java基础/自定义异常.html">
            
                    
                    自定义异常
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.13" data-path="../java基础/深度拷贝.html">
            
                <a href="../java基础/深度拷贝.html">
            
                    
                    深度拷贝
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.14" data-path="../java基础/泛型详解.html">
            
                <a href="../java基础/泛型详解.html">
            
                    
                    泛型详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.15" data-path="../java基础/线程详解.html">
            
                <a href="../java基础/线程详解.html">
            
                    
                    线程详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.16" data-path="../java基础/java注解.html">
            
                <a href="../java基础/java注解.html">
            
                    
                    注解详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.17" data-path="../java基础/数据解析.html">
            
                <a href="../java基础/数据解析.html">
            
                    
                    数据解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.18" data-path="../java基础/java8新特性.html">
            
                <a href="../java基础/java8新特性.html">
            
                    
                    Java8新特性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="android零散知识.html">
            
                <a href="android零散知识.html">
            
                    
                    Android部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="基础控件使用.html">
            
                <a href="基础控件使用.html">
            
                    
                    基础控件使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="android零散知识.html">
            
                <a href="android零散知识.html">
            
                    
                    Android零散知识
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="android坐标体系.html">
            
                <a href="android坐标体系.html">
            
                    
                    Android坐标体系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="APP的启动流程.html">
            
                <a href="APP的启动流程.html">
            
                    
                    APP启动流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.5" data-path="View加载流程.html">
            
                <a href="View加载流程.html">
            
                    
                    View加载流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.6" data-path="事件分发机制.html">
            
                <a href="事件分发机制.html">
            
                    
                    事件分发机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.7" data-path="控件绘制流程.html">
            
                <a href="控件绘制流程.html">
            
                    
                    控件绘制流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.8" data-path="常用shape.html">
            
                <a href="常用shape.html">
            
                    
                    常用shape
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.9" data-path="进程通信.html">
            
                <a href="进程通信.html">
            
                    
                    进程通信
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.10" data-path="../通信方式/通信方式详解.html">
            
                <a href="../通信方式/通信方式详解.html">
            
                    
                    通信方式详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.11" data-path="Binder详解.html">
            
                <a href="Binder详解.html">
            
                    
                    Binder详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.12" data-path="Handler详解.html">
            
                <a href="Handler详解.html">
            
                    
                    Handle详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.13" data-path="Fragment详解.html">
            
                <a href="Fragment详解.html">
            
                    
                    Fragment详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.14" data-path="Activity详解.html">
            
                <a href="Activity详解.html">
            
                    
                    Activity详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.15" data-path="BroadcastReceiver.html">
            
                <a href="BroadcastReceiver.html">
            
                    
                    BroadcastReceiver详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.16" data-path="Service服务.html">
            
                <a href="Service服务.html">
            
                    
                    Service详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.17" data-path="动画详解.html">
            
                <a href="动画详解.html">
            
                    
                    动画详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.18" data-path="屏幕刷新机制.html">
            
                <a href="屏幕刷新机制.html">
            
                    
                    屏幕刷新机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.19" data-path="屏幕适配.html">
            
                <a href="屏幕适配.html">
            
                    
                    屏幕适配
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.12.20" data-path="图片加载详解.html">
            
                <a href="图片加载详解.html">
            
                    
                    图片加载详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.21" data-path="WebView详解.html">
            
                <a href="WebView详解.html">
            
                    
                    WebView详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.22" data-path="沉浸式.html">
            
                <a href="沉浸式.html">
            
                    
                    沉浸式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.23" data-path="相机模块.html">
            
                <a href="相机模块.html">
            
                    
                    相机模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.24" data-path="地图模块.html">
            
                <a href="地图模块.html">
            
                    
                    地图模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.25" data-path="Androidstudio插件开发.html">
            
                <a href="Androidstudio插件开发.html">
            
                    
                    Androidstudio插件开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.26" data-path="Apk插件化开发.html">
            
                <a href="Apk插件化开发.html">
            
                    
                    Apk插件化开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.27" data-path="App组件化开发.html">
            
                <a href="App组件化开发.html">
            
                    
                    App组件化开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.28" data-path="sdk开发.html">
            
                <a href="sdk开发.html">
            
                    
                    sdk开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.29" data-path="APP优化.html">
            
                <a href="APP优化.html">
            
                    
                    APP优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.30" data-path="项目参数配置.html">
            
                <a href="项目参数配置.html">
            
                    
                    项目参数配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.31" data-path="App发布.html">
            
                <a href="App发布.html">
            
                    
                    App发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.32" data-path="Android外挂.html">
            
                <a href="Android外挂.html">
            
                    
                    Android外挂
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.33" data-path="Android字节码插桩.html">
            
                <a href="Android字节码插桩.html">
            
                    
                    Android字节码插桩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.34" data-path="智能家居.html">
            
                <a href="智能家居.html">
            
                    
                    智能家居
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../python/python基础.html">
            
                <a href="../python/python基础.html">
            
                    
                    python部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../python/python基础.html">
            
                <a href="../python/python基础.html">
            
                    
                    python基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../python/python爬虫.html">
            
                <a href="../python/python爬虫.html">
            
                    
                    python爬虫
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../gradle/Groovy.html">
            
                <a href="../gradle/Groovy.html">
            
                    
                    Groovy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../kotlin/kotlin部分.html">
            
                <a href="../kotlin/kotlin部分.html">
            
                    
                    kotlin部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="../flutter/flutter部分.html">
            
                <a href="../flutter/flutter部分.html">
            
                    
                    flutter部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="../native/ccpp.html">
            
                <a href="../native/ccpp.html">
            
                    
                    native部分
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" data-path="../native/Linux.html">
            
                <a href="../native/Linux.html">
            
                    
                    Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="../native/ccpp.html">
            
                <a href="../native/ccpp.html">
            
                    
                    cCpp
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.3" data-path="../native/NDK.html">
            
                <a href="../native/NDK.html">
            
                    
                    NDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.4" data-path="../native/系统编译剪裁.html">
            
                <a href="../native/系统编译剪裁.html">
            
                    
                    系统编译剪裁
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.5" data-path="../native/音视频.html">
            
                <a href="../native/音视频.html">
            
                    
                    音视频
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.6" data-path="../native/音视频第三方库.html">
            
                <a href="../native/音视频第三方库.html">
            
                    
                    音视频第三方库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.7" data-path="../native/相关代码.html">
            
                <a href="../native/相关代码.html">
            
                    
                    相关代码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="../server/服务器部分.html">
            
                <a href="../server/服务器部分.html">
            
                    
                    服务器部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="../webDev/web部分.html">
            
                <a href="../webDev/web部分.html">
            
                    
                    web部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="../人工智能/人工智能相关概念.html">
            
                <a href="../人工智能/人工智能相关概念.html">
            
                    
                    人工智能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="../面试真题/极飞.html">
            
                <a href="../面试真题/极飞.html">
            
                    
                    面试真题
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >图片加载详解</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#&#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;"><b>1. </b>&#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;</a></li><ul><li><span class="title-icon "></span><a href="#&#x4EC0;&#x4E48;&#x662F;-&#x4E09;&#x7EA7;&#x7F13;&#x5B58;"><b>1.1. </b>&#x4EC0;&#x4E48;&#x662F; &#x4E09;&#x7EA7;&#x7F13;&#x5B58;</a></li><li><span class="title-icon "></span><a href="#lrucache-&#x7F13;&#x5B58;&#x7B97;&#x6CD5;"><b>1.2. </b>LruCache &#x7F13;&#x5B58;&#x7B97;&#x6CD5;</a></li><li><span class="title-icon "></span><a href="#bitmap-&#x590D;&#x7528;&#x6C60;"><b>1.3. </b>Bitmap &#x590D;&#x7528;&#x6C60;</a></li></ul><li><span class="title-icon "></span><a href="#&#x76F8;&#x5173;&#x63D0;&#x95EE;"><b>2. </b>&#x76F8;&#x5173;&#x63D0;&#x95EE;</a></li><ul><li><span class="title-icon "></span><a href="#bitmap-&#x5185;&#x5B58;-&#x548C;-drawable-&#x76EE;&#x5F55;&#x7684;&#x5173;&#x7CFB;"><b>2.1. </b>Bitmap &#x5185;&#x5B58; &#x548C; drawable &#x76EE;&#x5F55;&#x7684;&#x5173;&#x7CFB;</a></li><li><span class="title-icon "></span><a href="#&#x56FE;&#x7247;&#x5360;&#x7528;&#x5185;&#x5B58;-&#x7684;&#x8BA1;&#x7B97;&#x89C4;&#x5219;"><b>2.2. </b>&#x56FE;&#x7247;&#x5360;&#x7528;&#x5185;&#x5B58; &#x7684;&#x8BA1;&#x7B97;&#x89C4;&#x5219;</a></li><li><span class="title-icon "></span><a href="#&#x56FE;&#x7247;-&#x4ECE;-xhdpi-&#x653E;&#x5230;-xxhdp-&#xFF0C;&#x5185;&#x5B58;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x51CF;&#x5C0F;"><b>2.3. </b>&#x56FE;&#x7247; &#x4ECE; xhdpi &#x653E;&#x5230; xxhdp &#xFF0C;&#x5185;&#x5B58;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x51CF;&#x5C0F;</a></li><li><span class="title-icon "></span><a href="#&#x56FE;&#x7247;-&#x5360;&#x7528;-&#x78C1;&#x76D8;-&#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x8BA1;&#x7B97;"><b>2.4. </b>&#x56FE;&#x7247; &#x5360;&#x7528; &#x78C1;&#x76D8; &#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x8BA1;&#x7B97;</a></li><li><span class="title-icon "></span><a href="#android-&#x5927;&#x56FE;&#x3001;&#x957F;&#x56FE;-&#x52A0;&#x8F7D;"><b>2.5. </b>Android &#x5927;&#x56FE;&#x3001;&#x957F;&#x56FE; &#x52A0;&#x8F7D;</a></li><li><span class="title-icon "></span><a href="#bitmap-&#x5185;&#x5B58;&#x590D;&#x7528;-optionsinbitmap---optionsinmutable-"><b>2.6. </b>Bitmap &#x5185;&#x5B58;&#x590D;&#x7528; (options.inBitmap   options.inMutable )</a></li><li><span class="title-icon "></span><a href="#injustdecodebounds-&#x51CF;&#x5C0F;&#x5185;&#x5B58;&#x5F00;&#x9500;"><b>2.7. </b>inJustDecodeBounds &#x51CF;&#x5C0F;&#x5185;&#x5B58;&#x5F00;&#x9500;</a></li><li><span class="title-icon "></span><a href="#bitmap-&#x4E0D;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x5982;&#x4F55;&#x51CF;&#x5C11;&#x5185;&#x5B58;"><b>2.8. </b>Bitmap &#x4E0D;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;,&#x5982;&#x4F55;&#x51CF;&#x5C11;&#x5185;&#x5B58;</a></li><li><span class="title-icon "></span><a href="#&#x56FE;&#x7247;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x3001;&#x53D8;&#x5F62;&#x600E;&#x4E48;&#x5904;&#x7406;"><b>2.9. </b>&#x56FE;&#x7247;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x3001;&#x53D8;&#x5F62;&#x600E;&#x4E48;&#x5904;&#x7406;</a></li><li><span class="title-icon "></span><a href="#&#x5982;&#x4F55;&#x8DE8;&#x8FDB;&#x7A0B;&#x4F20;&#x9012;&#x5927;&#x56FE;"><b>2.10. </b>&#x5982;&#x4F55;&#x8DE8;&#x8FDB;&#x7A0B;&#x4F20;&#x9012;&#x5927;&#x56FE;</a></li></ul><li><span class="title-icon "></span><a href="#drawable-&#x76F8;&#x5173;&#x5DE5;&#x5177;"><b>3. </b>Drawable &#x76F8;&#x5173;&#x5DE5;&#x5177;</a></li><ul><li><span class="title-icon "></span><a href="#drawable-&#x7F29;&#x653E;"><b>3.1. </b>Drawable &#x7F29;&#x653E;</a></li></ul><li><span class="title-icon "></span><a href="#&#x56FE;&#x7247;&#x683C;&#x5F0F;"><b>4. </b>&#x56FE;&#x7247;&#x683C;&#x5F0F;</a></li><ul><li><span class="title-icon "></span><a href="#webp"><b>4.1. </b>webP</a></li></ul><li><span class="title-icon "></span><a href="#svg-scalable-vector-graphics"><b>5. </b>SVG (Scalable Vector Graphics)</a></li><ul><li><span class="title-icon "></span><a href="#svg-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;"><b>5.1. </b>SVG &#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;</a></li></ul><li><span class="title-icon "></span><a href="#vector"><b>6. </b>vector</a></li><ul><li><span class="title-icon "></span><a href="#vector-&#x6807;&#x7B7E;"><b>6.1. </b>vector &#x6807;&#x7B7E;</a></li><li><span class="title-icon "></span><a href="#vector-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;"><b>6.2. </b>vector &#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;</a></li></ul><li><span class="title-icon "></span><a href="#&#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x5DE5;&#x5177;"><b>7. </b>&#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x5DE5;&#x5177;</a></li><ul><li><span class="title-icon "></span><a href="#glide-&#x5728;&#x7EBF;&#x6587;&#x6863;"><b>7.1. </b>Glide &#x5728;&#x7EBF;&#x6587;&#x6863;</a></li><li><span class="title-icon "></span><a href="#glide-&#x4F18;&#x70B9;"><b>7.2. </b>Glide &#x4F18;&#x70B9;</a></li><li><span class="title-icon "></span><a href="#glide3x-&#x4F7F;&#x7528;"><b>7.3. </b>Glide3.x &#x4F7F;&#x7528;</a></li><li><span class="title-icon "></span><a href="#glide-4x-&#x7684;&#x53D8;&#x5316;"><b>7.4. </b>glide 4.x &#x7684;&#x53D8;&#x5316;</a></li></ul><li><span class="title-icon "></span><a href="#gif-&#x52A0;&#x8F7D;"><b>8. </b>gif &#x52A0;&#x8F7D;</a></li><li><span class="title-icon "></span><a href="#&#x7CFB;&#x7EDF;&#x76F8;&#x518C;"><b>9. </b>&#x7CFB;&#x7EDF;&#x76F8;&#x518C;</a></li></ul></div><a href="#&#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;"><a name="&#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x76F8;&#x5173;&#x6982;&#x5FF5;&#x548C;&#x7B97;&#x6CD5;</h1>
<h2 id="&#x4EC0;&#x4E48;&#x662F;-&#x4E09;&#x7EA7;&#x7F13;&#x5B58;"><a name="&#x4EC0;&#x4E48;&#x662F;-&#x4E09;&#x7EA7;&#x7F13;&#x5B58;" class="anchor-navigation-ex-anchor" href="#&#x4EC0;&#x4E48;&#x662F;-&#x4E09;&#x7EA7;&#x7F13;&#x5B58;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x4EC0;&#x4E48;&#x662F; &#x4E09;&#x7EA7;&#x7F13;&#x5B58;</h2>
<pre><code class="lang-text">1&#x3001;&#x5185;&#x5B58;&#x7F13;&#x5B58;&#xFF0C;&#x4F18;&#x5148;&#x52A0;&#x8F7D;&#xFF0C;&#x901F;&#x5EA6;&#x6700;&#x5FEB;
2&#x3001;&#x672C;&#x5730;&#x78C1;&#x76D8;&#x7F13;&#x5B58;&#xFF0C;&#x6B21;&#x4F18;&#x5148;&#x52A0;&#x8F7D;&#xFF0C;&#x901F;&#x5EA6;&#x5FEB;
3&#x3001;&#x7F51;&#x7EDC;&#x7F13;&#x5B58;&#xFF0C;&#x6700;&#x540E;&#x52A0;&#x8F7D;&#xFF0C;&#x901F;&#x5EA6;&#x6162;&#xFF0C;&#x6D88;&#x8017;&#x6D41;&#x91CF;
</code></pre>
<h2 id="lrucache-&#x7F13;&#x5B58;&#x7B97;&#x6CD5;"><a name="lrucache-&#x7F13;&#x5B58;&#x7B97;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#lrucache-&#x7F13;&#x5B58;&#x7B97;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. LruCache &#x7F13;&#x5B58;&#x7B97;&#x6CD5;</h2>
<pre><code class="lang-text">Least Recently Used Cache /&#x8FD1;&#x671F;&#x6700;&#x5C11;&#x4F7F;&#x7528; &#x3002;
&#x6838;&#x5FC3;&#x601D;&#x60F3;&#x662F;&#x5F53;&#x7F13;&#x5B58;&#x6EE1;&#x65F6;&#xFF0C;&#x4F1A;&#x4F18;&#x5148;&#x6DD8;&#x6C70;&#x90A3;&#x4E9B;&#x8FD1;&#x671F;&#x6700;&#x5C11;&#x4F7F;&#x7528;&#x7684;&#x7F13;&#x5B58;&#x5BF9;&#x8C61;&#x3002;
</code></pre>
<h2 id="bitmap-&#x590D;&#x7528;&#x6C60;"><a name="bitmap-&#x590D;&#x7528;&#x6C60;" class="anchor-navigation-ex-anchor" href="#bitmap-&#x590D;&#x7528;&#x6C60;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. Bitmap &#x590D;&#x7528;&#x6C60;</h2>
<pre><code class="lang-text">&#x4F7F;&#x7528; inBitmap &#x9009;&#x9879;, &#x9700;&#x8981;&#x83B7;&#x53D6;&#x56FE;&#x7247;&#x65F6; , &#x4F18;&#x5148;&#x4ECE; Bitmap &#x590D;&#x7528;&#x6C60;&#x4E2D;&#x67E5;&#x627E;&#x5DF2;&#x5B58;&#x5728;&#x7684; Bitmap &#x5BF9;&#x8C61; ;
&#x5047;&#x5982; Bitmap &#x5BF9;&#x8C61;&#x957F;&#x65F6;&#x95F4;&#x4E0D;&#x4F7F;&#x7528; , &#x5C31;&#x4F1A;&#x4ECE; LruCache &#x5185;&#x5B58;&#x7F13;&#x5B58;&#x4E2D;&#x79FB;&#x9664; , &#x653E;&#x5165;&#x5230; Bitmap &#x590D;&#x7528;&#x6C60;&#x4E2D;
</code></pre>
<h1 id="&#x76F8;&#x5173;&#x63D0;&#x95EE;"><a name="&#x76F8;&#x5173;&#x63D0;&#x95EE;" class="anchor-navigation-ex-anchor" href="#&#x76F8;&#x5173;&#x63D0;&#x95EE;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x76F8;&#x5173;&#x63D0;&#x95EE;</h1>
<h2 id="bitmap-&#x5185;&#x5B58;-&#x548C;-drawable-&#x76EE;&#x5F55;&#x7684;&#x5173;&#x7CFB;"><a name="bitmap-&#x5185;&#x5B58;-&#x548C;-drawable-&#x76EE;&#x5F55;&#x7684;&#x5173;&#x7CFB;" class="anchor-navigation-ex-anchor" href="#bitmap-&#x5185;&#x5B58;-&#x548C;-drawable-&#x76EE;&#x5F55;&#x7684;&#x5173;&#x7CFB;"><i class="fa fa-link" aria-hidden="true"></i></a>2.1. Bitmap &#x5185;&#x5B58; &#x548C; drawable &#x76EE;&#x5F55;&#x7684;&#x5173;&#x7CFB;</h2>
<pre><code class="lang-text">drawable    &#x5C4F;&#x5E55;&#x5BC6;&#x5EA6;
ldpi        120
mdpi        160
hdpi        240
xhdpi        320
xxhdpi        480

drawable &#x76EE;&#x5F55; &#x4F1A;&#x5F71;&#x54CD;&#x539F;&#x56FE;&#x7F29;&#x653E;&#x6BD4;&#xFF0C;&#x8FDB;&#x800C;&#x5F71;&#x54CD; bitmap &#x7684;&#x5185;&#x5B58;&#x5360;&#x7528;&#x3002;
&#x7F29;&#x653E;&#x6BD4;K  = &#x8BBE;&#x5907;dpi / drawable&#x76EE;&#x5F55;&#x6240;&#x4EE3;&#x8868;&#x7684; dpi
</code></pre>
<h2 id="&#x56FE;&#x7247;&#x5360;&#x7528;&#x5185;&#x5B58;-&#x7684;&#x8BA1;&#x7B97;&#x89C4;&#x5219;"><a name="&#x56FE;&#x7247;&#x5360;&#x7528;&#x5185;&#x5B58;-&#x7684;&#x8BA1;&#x7B97;&#x89C4;&#x5219;" class="anchor-navigation-ex-anchor" href="#&#x56FE;&#x7247;&#x5360;&#x7528;&#x5185;&#x5B58;-&#x7684;&#x8BA1;&#x7B97;&#x89C4;&#x5219;"><i class="fa fa-link" aria-hidden="true"></i></a>2.2. &#x56FE;&#x7247;&#x5360;&#x7528;&#x5185;&#x5B58; &#x7684;&#x8BA1;&#x7B97;&#x89C4;&#x5219;</h2>
<pre><code class="lang-text">&#x540C;&#x4E00;&#x4E2A;&#x56FE;&#x7247;&#x5728;&#x4E0D;&#x540C;&#x5C4F;&#x5E55;&#x5BC6;&#x5EA6;&#x4E0B;&#x4F1A;&#x7F29;&#x653E;&#x3002;
&#x7F29;&#x653E;&#x6BD4;K  = &#x8BBE;&#x5907;dpi / drawable&#x76EE;&#x5F55;&#x6240;&#x4EE3;&#x8868;&#x7684; dpi

Bitmap &#x5360;&#x7528;&#x5185;&#x5B58; = (K*&#x539F;&#x56FE;&#x957F;&#x5EA6; ) *  (K*&#x539F;&#x56FE;&#x5BBD;&#x5EA6;)  * 1&#x4E2A;&#x50CF;&#x7D20;&#x5360;&#x7528;&#x7684;&#x5B57;&#x8282;&#x6570;

&#x5355;&#x4F4D;px&#x5360;&#x7528;&#x7684;&#x5B57;&#x8282;&#x6570; &#x8DDF;&#x56FE;&#x7247;&#x7684;&#x7F16;&#x7801;&#x683C;&#x5F0F;&#x6709;&#x5173;&#xFF1A;
ALPHA_8   : &#x6BCF;&#x4E2A;&#x50CF;&#x7D20;&#x5360;&#x7528; 1byte &#x5185;&#x5B58; -(&#x7528; &#x4E00;&#x4E2A; 8 bit &#x5B58;&#x50A8;)
ARGB_4444 : &#x6BCF;&#x4E2A;&#x50CF;&#x7D20;&#x5360;&#x7528; 2byte &#x5185;&#x5B58; -(alpha red green blue &#x5404;4&#x4E2A; bit  -&gt;  (4*4)/8 =2 ) 
RGB_565   : &#x6BCF;&#x4E2A;&#x50CF;&#x7D20;&#x5360;&#x7528; 2byte &#x5185;&#x5B58; -(red 5 bit green 6 bit blue 5 bit  -&gt; (5+6+5)/8 =2 )
ARGB_8888 : &#x6BCF;&#x4E2A;&#x50CF;&#x7D20;&#x5360;&#x7528; 4byte &#x5185;&#x5B58; -(alpha red green blue &#x5404;8 bit -&gt;  (4*8)/8 =4 )
</code></pre>
<h2 id="&#x56FE;&#x7247;-&#x4ECE;-xhdpi-&#x653E;&#x5230;-xxhdp-&#xFF0C;&#x5185;&#x5B58;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x51CF;&#x5C0F;"><a name="&#x56FE;&#x7247;-&#x4ECE;-xhdpi-&#x653E;&#x5230;-xxhdp-&#xFF0C;&#x5185;&#x5B58;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x51CF;&#x5C0F;" class="anchor-navigation-ex-anchor" href="#&#x56FE;&#x7247;-&#x4ECE;-xhdpi-&#x653E;&#x5230;-xxhdp-&#xFF0C;&#x5185;&#x5B58;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x51CF;&#x5C0F;"><i class="fa fa-link" aria-hidden="true"></i></a>2.3. &#x56FE;&#x7247; &#x4ECE; xhdpi &#x653E;&#x5230; xxhdp &#xFF0C;&#x5185;&#x5B58;&#x4E3A;&#x4EC0;&#x4E48;&#x4F1A;&#x51CF;&#x5C0F;</h2>
<pre><code class="lang-text">&#x7F29;&#x653E;&#x6BD4;K  = &#x8BBE;&#x5907;dpi / drawable&#x76EE;&#x5F55;&#x6240;&#x4EE3;&#x8868;&#x7684; dpi &#xFF0C;
&#x6240;&#x4EE5; &#x7F29;&#x653E;&#x6BD4;&#x4F1A;&#x53D8;&#x5C0F; &#xFF0C;&#x6839;&#x636E;&#x5185;&#x5B58;&#x8BA1;&#x7B97;&#x89C4;&#x5219;&#xFF0C;&#x6240;&#x4EE5;&#x4F1A;&#x51CF;&#x5C0F;&#x3002;
</code></pre>
<p><img src="../pics/&#x56FE;&#x7247;&#x5185;&#x5B58;&#x6D4B;&#x8BD5;.png" alt=""></p>
<h2 id="&#x56FE;&#x7247;-&#x5360;&#x7528;-&#x78C1;&#x76D8;-&#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x8BA1;&#x7B97;"><a name="&#x56FE;&#x7247;-&#x5360;&#x7528;-&#x78C1;&#x76D8;-&#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x8BA1;&#x7B97;" class="anchor-navigation-ex-anchor" href="#&#x56FE;&#x7247;-&#x5360;&#x7528;-&#x78C1;&#x76D8;-&#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x8BA1;&#x7B97;"><i class="fa fa-link" aria-hidden="true"></i></a>2.4. &#x56FE;&#x7247; &#x5360;&#x7528; &#x78C1;&#x76D8; &#x5B58;&#x50A8;&#x7A7A;&#x95F4;&#x8BA1;&#x7B97;</h2>
<pre><code class="lang-text">&#x5E76;&#x6CA1;&#x6709;&#x50CF;&#x5360;&#x7528;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x4E00;&#x6837;&#x6709;&#x4E2A;&#x660E;&#x786E;&#x7684;&#x516C;&#x5F0F;&#x3002;
&#x800C;&#x4E14;&#x8981;&#x660E;&#x786E;&#x5360;&#x7528;&#x78C1;&#x76D8;&#x7A7A;&#x95F4;&#x548C;&#x5360;&#x7528;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x5B8C;&#x5168;&#x662F;&#x4E0D;&#x540C;&#x7684;&#x6982;&#x5FF5;&#xFF0C;
&#x4F8B;&#x5982;&#x5360;&#x7528;&#x78C1;&#x76D8;10kb&#x7684;&#x56FE;&#x7247; &#x5360;&#x7528;&#x7684;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x9700;&#x8981;1M&#x3002;
&#x4E0D;&#x8981;&#x5C1D;&#x8BD5;&#x901A;&#x8FC7;&#x538B;&#x7F29;&#x56FE;&#x7247;&#x78C1;&#x76D8;&#x5B58;&#x50A8;&#x5927;&#x5C0F;&#x6765;&#x7F13;&#x89E3;OOM&#x7684;&#x95EE;&#x9898;&#x3002;

&#x5360;&#x7528; &#x78C1;&#x76D8;&#x7684;&#x5927;&#x5C0F; &#x8DDF;&#x56FE;&#x7247;&#x7684;&#x5206;&#x8FA8;&#x7387;&#x548C; &#x538B;&#x7F29;&#x7B97;&#x6CD5;&#x6709;&#x5173;&#xFF0C;
&#x540C;&#x6837;&#x7684;&#x4E00;&#x5F20;&#x56FE;&#x7247;&#xFF0C;&#x7B49;&#x8D28;&#x91CF;&#x538B;&#x7F29;&#x540E;&#x7684;&#x5927;&#x5C0F;&#x53EF;&#x80FD;&#x76F8;&#x5DEE;&#x5F88;&#x5927;&#x3002;
&#x4F8B;&#x5982; https://tinypng.com/ &#x5C31;&#x63D0;&#x4F9B;&#x4E86;&#x975E;&#x5E38;&#x597D;&#x7684;&#x538B;&#x7F29;&#x4F53;&#x9A8C;&#x3002;
</code></pre>
<h2 id="android-&#x5927;&#x56FE;&#x3001;&#x957F;&#x56FE;-&#x52A0;&#x8F7D;"><a name="android-&#x5927;&#x56FE;&#x3001;&#x957F;&#x56FE;-&#x52A0;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#android-&#x5927;&#x56FE;&#x3001;&#x957F;&#x56FE;-&#x52A0;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>2.5. Android &#x5927;&#x56FE;&#x3001;&#x957F;&#x56FE; &#x52A0;&#x8F7D;</h2>
<pre><code class="lang-text">&#x7ED9;&#x4E00;&#x5F20; 10M&#x7684;&#x201C;&#x6E05;&#x660E;&#x4E0A;&#x6CB3;&#x56FE;&#x201D;&#xFF0C;&#x5982;&#x679C;&#x76F4;&#x63A5;&#x52A0;&#x8F7D;&#xFF0C;&#x5F88;&#x53EF;&#x80FD;&#x4F1A;&#x76F4;&#x63A5; OOM &#xFF0C;
&#x5982;&#x679C;&#x901A;&#x8FC7;&#x914D;&#x7F6E;&#x538B;&#x7F29;&#x7387; inSampleSize &#x538B;&#x7F29;&#x5C55;&#x793A;&#xFF0C;&#x90A3;&#x4E48;&#x56FE;&#x7247;&#x5C31;&#x4F1A;&#x5F88;&#x6A21;&#x7CCA;&#x3002;

&#x6B64;&#x65F6;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5176;&#x4ED6;&#x65B9;&#x6848;&#x6765;&#x5C55;&#x793A;&#x9AD8;&#x6E05;&#x5927;&#x56FE;&#xFF0C;&#x4F8B;&#x5982;&#x5148;&#x5C55;&#x793A;&#x4E00;&#x5F20;&#x8F83;&#x5C0F;&#x7684;&#x7F29;&#x7387;&#x56FE;&#xFF0C;
&#x7136;&#x540E;&#x901A;&#x8FC7;&#x624B;&#x6307;&#x9009;&#x5B9A;&#xFF0C;&#x52A0;&#x8F7D;&#x5C40;&#x90E8;&#x7684;&#x5927;&#x56FE;&#xFF0C;&#x624B;&#x6307;&#x79FB;&#x52A8;&#x65F6;&#x52A0;&#x8F7D;&#x7684;&#x5927;&#x56FE;&#x533A;&#x57DF;&#x4E5F;&#x8DDF;&#x7740;&#x79FB;&#x52A8;&#x3002;
&#x4F8B;&#x5982;&#x4EAC;&#x4E1C;&#x548C;&#x6DD8;&#x5B9D;&#x7684;&#x7F51;&#x9875;&#x4E0A;&#x9AD8;&#x6E05;&#x5546;&#x54C1;&#x56FE;&#x5C31;&#x662F;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F;&#x3002;
&#x603B;&#x4E4B;&#x5C31;&#x662F;&#xFF0C;&#x53EA;&#x52A0;&#x8F7D;&#x9700;&#x8981;&#x663E;&#x793A;&#x7684;&#x90E8;&#x5206;&#xFF0C;&#x8981;&#x770B;&#x54EA;&#x91CC;&#x5C31;&#x52A0;&#x8F7D;&#x54EA;&#x91CC;&#x3002;

&#x914D;&#x5408; Android &#x7684; BitmapRegionDecoder &#x53EF;&#x4EE5;&#x5B9E;&#x73B0;&#x8FD9;&#x79CD;&#x65B9;&#x6848;&#x3002;
</code></pre>
<h2 id="bitmap-&#x5185;&#x5B58;&#x590D;&#x7528;-optionsinbitmap---optionsinmutable-"><a name="bitmap-&#x5185;&#x5B58;&#x590D;&#x7528;-optionsinbitmap---optionsinmutable-" class="anchor-navigation-ex-anchor" href="#bitmap-&#x5185;&#x5B58;&#x590D;&#x7528;-optionsinbitmap---optionsinmutable-"><i class="fa fa-link" aria-hidden="true"></i></a>2.6. Bitmap &#x5185;&#x5B58;&#x590D;&#x7528; (options.inBitmap   options.inMutable )</h2>
<pre><code class="lang-text">inBitmap &#x751F;&#x6548;&#x7684;&#x89C4;&#x5219;
1&#x3001;inBitmap &#x53EA;&#x80FD;&#x5728; 3.0 &#x624D;&#x6709; &#x3002;
1&#x3001;&#x5728;Android 4.4&#x4E4B;&#x524D;&#xFF0C;&#x53EA;&#x80FD;&#x91CD;&#x7528;&#x76F8;&#x540C;&#x5927;&#x5C0F;&#x7684; Bitmap &#x5185;&#x5B58;&#x533A;&#x57DF;&#xFF1B;
4.4&#x4E4B;&#x540E;&#x53EA;&#x8981;&#x590D;&#x7528;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x7684; Bitmap &#x5BF9;&#x8C61;&#x5927;&#x5C0F;&#x6BD4; inBitmap &#x6307;&#x5411;&#x7684;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x8981;&#x5C0F;&#x5373;&#x53EF;&#x3002;

2&#x3001; &#x65B0;&#x7533;&#x8BF7;&#x7684;Bitmap&#x4E0E;&#x65E7;&#x7684;Bitmap&#x5FC5;&#x987B;&#x6709;&#x76F8;&#x540C;&#x7684;&#x89E3;&#x7801;&#x683C;&#x5F0F;&#x3002;&#x5982;&#x679C;&#x524D;&#x9762;&#x7684;Bitmap&#x662F;8888&#xFF0C;
&#x90A3;&#x4E48;&#x5C31;&#x4E0D;&#x80FD;&#x652F;&#x6301;4444&#x4E0E;565&#x683C;&#x5F0F;&#x7684;Bitmap&#x4E86;&#x3002;

BitmapFactory.Options options;
Bitmap inBitmap  ;
void init(Context context , int resId){
    options = new BitmapFactory.Options() ;
    options.inMutable =true; // &#x5141;&#x8BB8;&#x590D;&#x7528;&#xFF0C;&#x5FC5;&#x987B;&#x914D;&#x5957;&#x4F7F;&#x7528;
    inBitmap =BitmapFactory.decodeResource( context.getResources(), R.drawable.resId, options) ;
}

void getBitmap(Context context ,int resId ){
    options.inBitmap = inBitmap; // &#x6307;&#x5B9A;&#x590D;&#x7528;
    Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), resId, options);
}
</code></pre>
<h2 id="injustdecodebounds-&#x51CF;&#x5C0F;&#x5185;&#x5B58;&#x5F00;&#x9500;"><a name="injustdecodebounds-&#x51CF;&#x5C0F;&#x5185;&#x5B58;&#x5F00;&#x9500;" class="anchor-navigation-ex-anchor" href="#injustdecodebounds-&#x51CF;&#x5C0F;&#x5185;&#x5B58;&#x5F00;&#x9500;"><i class="fa fa-link" aria-hidden="true"></i></a>2.7. inJustDecodeBounds &#x51CF;&#x5C0F;&#x5185;&#x5B58;&#x5F00;&#x9500;</h2>
<pre><code class="lang-text">&#x7528;&#x6765;&#x83B7;&#x53D6;&#x56FE;&#x7247;&#x7684;&#x5927;&#x5C0F;&#x4FE1;&#x606F;&#x7684;&#x540C;&#x65F6;&#x4E0D;&#x5360;&#x7528;&#x5185;&#x5B58;&#x3002;
&#x4F8B;&#x5982;&#x6211;&#x4EEC;&#x53EA;&#x8981;&#x83B7;&#x53D6;&#x56FE;&#x7247;&#x672C;&#x8EAB;&#x7684;&#x5927;&#x5C0F;&#xFF0C;&#x76F4;&#x63A5;decodeResource &#x52A0;&#x8F7D; &#xFF0C;&#x90A3;&#x4E48;&#x4F1A;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A; Bitmap 
&#x4F1A;&#x6D6A;&#x8D39;&#x5185;&#x5B58;&#xFF0C;&#x4F46;&#x662F;&#x8BBE;&#x7F6E; inJustDecodeBounds = true &#xFF0C;&#x90A3;&#x4E48;&#x8FD4;&#x56DE;&#x7684; bitmap &#x662F;&#x7A7A;&#x7684;&#xFF0C;&#x5E76;&#x4E0D;&#x4F1A;&#x6D88;&#x8017;&#x5185;&#x5B58;&#x3002;

Bitmap  getImage(Context context) {
     BitmapFactory.Options options = new BitmapFactory.Options();
     options.inJustDecodeBounds = true ; // &#x6807;&#x8BB0;&#x53EA;&#x83B7;&#x53D6;&#x56FE;&#x7247;&#x4FE1;&#x606F;&#xFF0C;&#x5E76;&#x4E0D;&#x53BB;&#x52A0;&#x8F7D;bitmap &#x5230;&#x5185;&#x5B58;
     BitmapFactory.decodeResource(context.getResources(), R.drawable.test2, options) ;
     //&#x83B7;&#x53D6;&#x56FE;&#x7247;&#x7684;&#x957F;&#x5BBD;
     options.inSampleSize = getImageSampleSize(options.outWidth, options.outHeight) ;
     options.inJustDecodeBounds = false ;//  &#x5173;&#x95ED;&#x6807;&#x8BB0;
     return BitmapFactory.decodeResource(context.getResources(), R.drawable.test2, options);
 }
</code></pre>
<h2 id="bitmap-&#x4E0D;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x5982;&#x4F55;&#x51CF;&#x5C11;&#x5185;&#x5B58;"><a name="bitmap-&#x4E0D;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x5982;&#x4F55;&#x51CF;&#x5C11;&#x5185;&#x5B58;" class="anchor-navigation-ex-anchor" href="#bitmap-&#x4E0D;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x5982;&#x4F55;&#x51CF;&#x5C11;&#x5185;&#x5B58;"><i class="fa fa-link" aria-hidden="true"></i></a>2.8. Bitmap &#x4E0D;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x7684;&#x60C5;&#x51B5;&#x4E0B;,&#x5982;&#x4F55;&#x51CF;&#x5C11;&#x5185;&#x5B58;</h2>
<pre><code class="lang-text">&#x6839;&#x636E; &#x5185;&#x5B58;&#x5360;&#x7528;&#x516C;&#x5F0F;&#x5F97;&#x77E5;&#xFF0C;&#x5F71;&#x54CD;&#x5185;&#x5B58;&#x7684;&#x56E0;&#x7D20; &#x6709;&#x56FE;&#x7247;&#x7684;&#x957F;&#x5BBD; &#x548C;&#x56FE;&#x7247;&#x7684;&#x8D28;&#x91CF;&#x3002;
&#x65E0;&#x8BBA;&#x662F;&#x6539;&#x53D8;&#x56FE;&#x7247;&#x7684;&#x957F;&#x5BBD;&#x5C3A;&#x5BF8; &#x8FD8;&#x662F;&#x538B;&#x7F29;&#x56FE;&#x7247;&#x8D28;&#x91CF; &#x90FD;&#x4F1A;&#x5F71;&#x54CD;&#x6700;&#x7EC8;&#x7684;&#x663E;&#x793A;&#x6548;&#x679C;&#xFF0C;
&#x6240;&#x4EE5;&#x5728;&#x4E0D;&#x5F71;&#x54CD;&#x8D28;&#x91CF;&#x7684;&#x524D;&#x63D0;&#x4E0B;&#xFF0C;&#x53EF;&#x4EE5;&#x91C7;&#x7528;&#x5185;&#x5B58;&#x590D;&#x7528;&#x7684;&#x65B9;&#x6848;&#x3002;inBitmap  &#x3002;
</code></pre>
<h2 id="&#x56FE;&#x7247;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x3001;&#x53D8;&#x5F62;&#x600E;&#x4E48;&#x5904;&#x7406;"><a name="&#x56FE;&#x7247;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x3001;&#x53D8;&#x5F62;&#x600E;&#x4E48;&#x5904;&#x7406;" class="anchor-navigation-ex-anchor" href="#&#x56FE;&#x7247;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x3001;&#x53D8;&#x5F62;&#x600E;&#x4E48;&#x5904;&#x7406;"><i class="fa fa-link" aria-hidden="true"></i></a>2.9. &#x56FE;&#x7247;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x3001;&#x53D8;&#x5F62;&#x600E;&#x4E48;&#x5904;&#x7406;</h2>
<pre><code class="lang-text">&#x56FE;&#x7247;&#x663E;&#x793A;&#x53D8;&#x5F62;&#x7684;&#x539F;&#x56E0;&#x662F;&#x56E0;&#x4E3A; imageview &#x7684;&#x957F;&#x5BBD;&#x6BD4; &#x548C; &#x56FE;&#x7247;&#x7684;&#x957F;&#x5BBD;&#x6BD4;&#x4E0D;&#x4E00;&#x81F4;&#x5BFC;&#x81F4;&#x7684;&#x3002;
&#x4F8B;&#x5982; &#x6B63;&#x65B9;&#x5F62;&#x7684;&#x7167;&#x7247;&#x8981;&#x663E;&#x793A;&#x6210; &#x957F;&#x65B9;&#x5F62;&#xFF0C;&#x80AF;&#x5B9A;&#x4F1A;&#x53D8;&#x5F62;&#x3002;

&#x663E;&#x793A;&#x4E0D;&#x5168;&#x7684;&#x73B0;&#x8C61;&#x662F;&#x56E0;&#x4E3A;&#x957F;&#x5BBD;&#x6BD4;&#x4E0D;&#x4E00;&#x81F4;&#xFF0C;&#x4E3A;&#x4E86;&#x907F;&#x514D;&#x53D8;&#x5F62;&#x91C7;&#x53D6;&#x7684; scaleType=&quot;centerCrop&quot; &#x3002;

&#x4E3A;&#x4E86;&#x907F;&#x514D;&#x663E;&#x793A;&#x4E0D;&#x5168;&#x548C;&#x53D8;&#x5F62;&#x7684;&#x95EE;&#x9898;&#xFF0C;&#x4E00;&#x822C;&#x662F;&#x4ECE;&#x6E90;&#x5934;&#x6765;&#x89E3;&#x51B3;&#xFF0C;
&#x4F8B;&#x5982;&#xFF1A;&#x5BBD;&#x5EA6;&#x56FA;&#x5B9A;&#xFF0C;&#x7136;&#x540E;&#x6839;&#x636E;&#x957F;&#x5BBD;&#x6BD4;&#x52A8;&#x6001;&#x8BA1;&#x7B97;&#x51FA; imageview&#x7684; &#x9AD8;&#x5EA6;&#xFF0C;
&#x6216;&#x8005;&#x957F;&#x5BBD;&#x90FD;&#x56FA;&#x5B9A;&#xFF0C;&#x6B64;&#x65F6;&#x5C31;&#x8981;&#x7528; centerInside ,&#x7136;&#x540E;&#x4E24;&#x8FB9;&#x7559;&#x767D;&#x5904;&#x7406;&#x3002;
</code></pre>
<h2 id="&#x5982;&#x4F55;&#x8DE8;&#x8FDB;&#x7A0B;&#x4F20;&#x9012;&#x5927;&#x56FE;"><a name="&#x5982;&#x4F55;&#x8DE8;&#x8FDB;&#x7A0B;&#x4F20;&#x9012;&#x5927;&#x56FE;" class="anchor-navigation-ex-anchor" href="#&#x5982;&#x4F55;&#x8DE8;&#x8FDB;&#x7A0B;&#x4F20;&#x9012;&#x5927;&#x56FE;"><i class="fa fa-link" aria-hidden="true"></i></a>2.10. &#x5982;&#x4F55;&#x8DE8;&#x8FDB;&#x7A0B;&#x4F20;&#x9012;&#x5927;&#x56FE;</h2>
<pre><code class="lang-text">1&#x3001;&#x5982;&#x679C;&#x5BF9;&#x6548;&#x7387;&#x6CA1;&#x8981;&#x6C42;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; &#x5B58;&#x50A8;&#x6587;&#x4EF6;&#x7684;&#x65B9;&#x5F0F;&#x3002;
&#x9650;&#x628A;&#x56FE;&#x7247;&#x4FDD;&#x5B58;&#x5230;SD&#x5361;&#xFF0C;&#x7136;&#x540E;&#x53EA;&#x4F20;&#x9012; &#x8DEF;&#x5F84;&#x3002;&#x7136;&#x540E;&#x6839;&#x636E;&#x8DEF;&#x5F84;&#x52A0;&#x8F7D;&#x6587;&#x4EF6;&#x3002;

2&#x3001;&#x901A;&#x8FC7; Intent &#x76F4;&#x63A5;&#x4F20;&#x9012;  (&#x4E0D;&#x63A8;&#x8350;)
intent.putExtra(&quot;myBitmap&quot; ,bitmap) ;
&#x95EE;&#x9898;&#x662F;  Bitmap &#x592A;&#x5927;&#x4F1A;&#x629B; TransactionTooLargeException &#x5F02;&#x5E38;&#x3002;

&#x4E3A;&#x4EC0;&#x4E48; Intent &#x4F20;&#x503C;&#x4F1A;&#x6709;&#x5927;&#x5C0F;&#x9650;&#x5236;&#x3002;
&#x5E94;&#x7528;&#x8FDB;&#x7A0B;&#x5728;&#x542F;&#x52A8; Binder &#x673A;&#x5236;&#x65F6;&#x4F1A;&#x6620;&#x5C04;&#x4E00;&#x5757; 1M &#x5927;&#x5C0F;&#x7684;&#x5185;&#x5B58;&#xFF0C;
&#x6240;&#x6709;&#x6B63;&#x5728;&#x8FDB;&#x884C;&#x7684; Binder &#x4E8B;&#x52A1;&#x5171;&#x4EAB;&#x8FD9; 1M &#x7684;&#x7F13;&#x51B2;&#x533A; &#x3002;
&#x5F53;&#x4F7F;&#x7528; Intent &#x8FDB;&#x884C; IPC &#x65F6;&#x7533;&#x8BF7;&#x7684;&#x7F13;&#x5B58;&#x8D85;&#x8FC7; 1M - &#x5176;&#x4ED6;&#x4E8B;&#x52A1;&#x5360;&#x7528;&#x7684;&#x5185;&#x5B58;&#x65F6;&#xFF0C;
&#x5C31;&#x4F1A;&#x7533;&#x8BF7;&#x5931;&#x8D25;&#x629B; TransactionTooLargeException &#x5F02;&#x5E38;&#x4E86;&#x3002;

3&#x3001;Bundle + AIDL  (&#x63A8;&#x8350;)
bundle.putBinder(&quot;myBitmap&quot;, new IRemoteGetBitmap.Stub() {
    public Bitmap getBitMap() throws RemoteException {
        return mBitmap;
    }
});
intent.putExtras(bundle);

&#x8F83;&#x5927;&#x7684; bitmap &#x76F4;&#x63A5;&#x901A;&#x8FC7; Intent &#x4F20;&#x9012;&#x5BB9;&#x6613;&#x629B;&#x5F02;&#x5E38;&#xFF0C;
&#x662F;&#x56E0;&#x4E3A; Intent &#x542F;&#x52A8;&#x7EC4;&#x4EF6;&#x65F6;&#xFF0C;&#x7CFB;&#x7EDF;&#x7981;&#x6389;&#x4E86;&#x6587;&#x4EF6;&#x63CF;&#x8FF0;&#x7B26; FileDescriptor  &#x673A;&#x5236; , 
bitmap &#x65E0;&#x6CD5;&#x5229;&#x7528;&#x5171;&#x4EAB;&#x5185;&#x5B58;&#xFF0C;&#x53EA;&#x80FD;&#x62F7;&#x8D1D;&#x5230; Binder &#x6620;&#x5C04;&#x7684;&#x7F13;&#x51B2;&#x533A;&#xFF0C;&#x5BFC;&#x81F4;&#x7F13;&#x51B2;&#x533A;&#x8D85;&#x9650;, &#x89E6;&#x53D1;&#x5F02;&#x5E38;; 
&#x800C;&#x901A;&#x8FC7; putBinder &#x7684;&#x65B9;&#x5F0F;&#xFF0C;&#x907F;&#x514D;&#x4E86; Intent &#x7981;&#x7528;&#x63CF;&#x8FF0;&#x7B26;&#x7684;&#x5F71;&#x54CD;, 
&#x53EF;&#x4EE5;&#x5229;&#x7528;&#x5171;&#x4EAB;&#x5185;&#x5B58;&#xFF0C;&#x6240;&#x4EE5;&#x80FD;&#x9AD8;&#x6548;&#x4F20;&#x8F93;&#x56FE;&#x7247;&#x3002;
</code></pre>
<h1 id="drawable-&#x76F8;&#x5173;&#x5DE5;&#x5177;"><a name="drawable-&#x76F8;&#x5173;&#x5DE5;&#x5177;" class="anchor-navigation-ex-anchor" href="#drawable-&#x76F8;&#x5173;&#x5DE5;&#x5177;"><i class="fa fa-link" aria-hidden="true"></i></a>3. Drawable &#x76F8;&#x5173;&#x5DE5;&#x5177;</h1>
<h2 id="drawable-&#x7F29;&#x653E;"><a name="drawable-&#x7F29;&#x653E;" class="anchor-navigation-ex-anchor" href="#drawable-&#x7F29;&#x653E;"><i class="fa fa-link" aria-hidden="true"></i></a>3.1. Drawable &#x7F29;&#x653E;</h2>
<pre><code class="lang-text">&#x6CE8;&#x610F;&#x8FD9;&#x79CD;&#x65B9;&#x5F0F; &#x4E0D;&#x80FD;&#x8F6C;&#x6362; svg &#x7C7B;&#x578B;&#x7684; Drawable &#xFF0C;&#x5426;&#x5219;&#x4F1A;&#x62A5;&#x9519;    
// &#x8FD4;&#x56DE; &#x6307;&#x5B9A;&#x5927;&#x5C0F;&#x7684; Drawable
public static Drawable resizeDrawable(Context context ,Drawable drawable , int size) {
    Bitmap b = ((BitmapDrawable)drawable).getBitmap();
    Bitmap bitmapResized = Bitmap.createScaledBitmap(b, size, size, true);
    //Bitmap bitmapResized = Bitmap.createScaledBitmap(b, size, size, false); // false &#x4F1A;&#x5931;&#x771F;
    return new BitmapDrawable(context.getResources(), bitmapResized);
}
</code></pre>
<h1 id="&#x56FE;&#x7247;&#x683C;&#x5F0F;"><a name="&#x56FE;&#x7247;&#x683C;&#x5F0F;" class="anchor-navigation-ex-anchor" href="#&#x56FE;&#x7247;&#x683C;&#x5F0F;"><i class="fa fa-link" aria-hidden="true"></i></a>4. &#x56FE;&#x7247;&#x683C;&#x5F0F;</h1>
<h2 id="webp"><a name="webp" class="anchor-navigation-ex-anchor" href="#webp"><i class="fa fa-link" aria-hidden="true"></i></a>4.1. webP</h2>
<pre><code class="lang-text">&#x5728;&#x4FDD;&#x8BC1;&#x56FE;&#x7247;&#x89C6;&#x89C9;&#x4E0D;&#x5931;&#x771F;&#x524D;&#x63D0;&#x4E0B;&#x7F29;&#x5C0F;&#x4F53;&#x79EF;&#xFF0C;&#x5BF9;&#x4E8E;&#x8282;&#x7701;&#x5E26;&#x5BBD;&#x548C;apk&#x4F53;&#x79EF;&#x5341;&#x5206;&#x91CD;&#x8981;&#x3002;
&#x7136;&#x800C;&#x76EE;&#x524D;&#x5BF9;&#x4E8E; JPEG&#x3001;PNG&#x3001;GIF &#x7B49;&#x5E38;&#x7528;&#x56FE;&#x7247;&#x683C;&#x5F0F;&#x7684;&#x4F18;&#x5316;&#x5DF2;&#x51E0;&#x4E4E;&#x8FBE;&#x5230;&#x6781;&#x81F4;&#xFF0C;
&#x56E0;&#x6B64;Google&#x4E8E;2010&#x5E74;&#x63D0;&#x51FA;&#x4E86; WebP &#xFF0C;&#x7ED9;&#x56FE;&#x7247;&#x7684;&#x4F18;&#x5316;&#x63D0;&#x4F9B;&#x4E86;&#x65B0;&#x7684;&#x53EF;&#x80FD;&#x3002;

WebP&#x4E3A;&#x7F51;&#x7EDC;&#x56FE;&#x7247;&#x63D0;&#x4F9B;&#x4E86;&#x65E0;&#x635F;&#x548C;&#x6709;&#x635F;&#x538B;&#x7F29;&#x80FD;&#x529B;&#xFF0C;&#x6709;&#x635F;&#x548C;&#x65E0;&#x635F; &#x90FD;&#x652F;&#x6301;&#x900F;&#x660E;&#x901A;&#x9053;&#x3002;
&#x8C37;&#x6B4C;&#x4E8E;2014&#x5E74;&#x63D0;&#x51FA;&#x4E86; &#x52A8;&#x6001;WebP&#xFF0C;&#x62D3;&#x5C55;WebP&#x4F7F;&#x5176;&#x652F;&#x6301;&#x52A8;&#x56FE;&#x80FD;&#x529B;&#x3002;
&#x52A8;&#x6001;WebP&#x76F8;&#x6BD4; GIF &#x652F;&#x6301;&#x66F4;&#x4E30;&#x5BCC;&#x7684;&#x8272;&#x5F69;&#xFF0C;&#x5E76;&#x4E14;&#x4E5F;&#x5360;&#x7528;&#x66F4;&#x5C0F;&#x7A7A;&#x95F4;&#x3002;

Android 4.0 &#x5F00;&#x59CB;&#x652F;&#x6301;&#x6709;&#x635F;&#x7684;WebP&#x56FE;&#x50CF;&#xFF0C;
Android 4.3 &#x5F00;&#x59CB;&#x652F;&#x6301;&#x65E0;&#x635F;&#x548C;&#x900F;&#x660E;&#x7684;WebP&#x56FE;&#x50CF;&#x3002;

Androidstudio &#x81EA;&#x5E26; &#x56FE;&#x7247;&#x8F6C;&#x6362; webP &#x548C; .9 &#x683C;&#x5F0F;&#x7684;&#x56FE;&#x7247;&#x3002;
&#x53EF;&#x4EE5;&#x5C06; PNG&#x3001;JPG&#x3001;BMP &#x6216;&#x9759;&#x6001;GIF &#x56FE;&#x50CF;&#x8F6C;&#x6362;&#x4E3A;WebP&#x683C;&#x5F0F; &#x3002;
&#x6682;&#x65F6;&#x4E0D;&#x652F;&#x6301; ico &#x683C;&#x5F0F;&#x7684;&#x56FE;&#x7247;&#x8F6C;&#x6362;&#x3002;
</code></pre>
<h1 id="svg-scalable-vector-graphics"><a name="svg-scalable-vector-graphics" class="anchor-navigation-ex-anchor" href="#svg-scalable-vector-graphics"><i class="fa fa-link" aria-hidden="true"></i></a>5. SVG (Scalable Vector Graphics)</h1>
<pre><code class="lang-text">&#x77E2;&#x91CF;&#x56FE; &#xFF0C;&#x5728;&#x5404;&#x79CD;&#x8BBE;&#x5907;&#x4E0A;&#x80FD;&#x5B9E;&#x73B0;&#x81EA;&#x7136;&#x4F38;&#x7F29;&#x6216;&#x6269;&#x5C55;&#x800C;&#x4E0D;&#x5F71;&#x54CD;&#x56FE;&#x7247;&#x8D28;&#x91CF;&#x3002;
1&#x3001;&#x52A0;&#x8F7D;&#x3001;&#x89E3;&#x6790; svg&#x6587;&#x4EF6;  &#xFF0C;&#x83B7;&#x5F97; path &#x6570;&#x636E;
2&#x3001;&#x5C06;path&#x6570;&#x636E;&#x8F6C;&#x6362;&#x4E3A; Path &#x5BF9;&#x8C61;&#x3002;&#x8C37;&#x6B4C;&#x5B98;&#x65B9;&#x6709;&#x73B0;&#x6210;&#x7684;&#x5DE5;&#x5177;&#x7C7B; PathParser.java&#x3002;
3&#x3001;&#x5C06;&#x89E3;&#x6790;&#x51FA;&#x6765;&#x7684;&#x6240;&#x6709;path&#x7ED8;&#x5236;&#x51FA;&#x6765;
4&#x3001;&#x5224;&#x65AD;&#x70B9;&#x51FB;&#x70B9;&#x662F;&#x5426;&#x5728;&#x5F53;&#x524D;path&#x8303;&#x56F4;&#x5185;&#x3002;
public boolean isInArea(Path mPath ,float x, float y){
    RectF r=new RectF();
    mPath.computeBounds(r, true);
    Region re=new Region();
    re.setPath(mPath, new Region((int)r.left,(int)r.top,(int)r.right,(int)r.bottom));
    return  re.contains((int)x, (int)y);
}
</code></pre>
<h2 id="svg-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;"><a name="svg-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;" class="anchor-navigation-ex-anchor" href="#svg-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;"><i class="fa fa-link" aria-hidden="true"></i></a>5.1. SVG &#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;</h2>
<p><a href="https://github.com/hnyer/taiwanDemo" target="_blank">https://github.com/hnyer/taiwanDemo</a>
<img src="../pics/SVG_demo.png" alt=""></p>
<h1 id="vector"><a name="vector" class="anchor-navigation-ex-anchor" href="#vector"><i class="fa fa-link" aria-hidden="true"></i></a>6. vector</h1>
<pre><code class="lang-text">vector &#x662F;Android &#x4E2D;&#x7684;&#x77E2;&#x91CF;&#x56FE;&#x4F7F;&#x7528;&#x65B9;&#x6848;&#x3002;
Android 5.0&#x53D1;&#x5E03;&#x7684;&#x65F6;&#x5019;&#xFF0C;Vector&#x53EA;&#x652F;&#x6301;Android 5.0+&#x3002;
&#x4E0D;&#x8FC7;&#x81EA;&#x4ECE;AppCompat 23.2&#x4E4B;&#x540E;&#xFF0C;Google&#x505A;&#x4E86;&#x517C;&#x5BB9;&#x5904;&#x7406; &#xFF0C;
&#x53EA;&#x9700;&#x8981;&#x5F15;&#x7528;com.android.support:appcompat-v7:23.2.0&#x4EE5;&#x4E0A;&#x7684;&#x7248;&#x672C;
&#x5C31;&#x9002;&#x7528;&#x4E8E;Android 2.1&#x4EE5;&#x4E0A;&#x7684;&#x6240;&#x6709;&#x7CFB;&#x7EDF; &#x3002;
</code></pre>
<h2 id="vector-&#x6807;&#x7B7E;"><a name="vector-&#x6807;&#x7B7E;" class="anchor-navigation-ex-anchor" href="#vector-&#x6807;&#x7B7E;"><i class="fa fa-link" aria-hidden="true"></i></a>6.1. vector &#x6807;&#x7B7E;</h2>
<pre><code class="lang-text">width            // &#x56FE;&#x5F62;&#x5BBD;&#x5EA6;
height           // &#x56FE;&#x5F62;&#x9AD8;&#x5EA6;
viewportHeight   // &#x753B;&#x5E03;&#x9AD8;&#x5EA6;
viewportWidth    // &#x753B;&#x5E03;&#x5BBD;&#x5EA6;
group            // &#x5BF9;Path&#x8FDB;&#x884C;&#x5206;&#x7EC4;
path &#x5BF9;&#x5E94;&#x4E00;&#x4E2A;Path
    name // path&#x540D;&#x5B57;
    fillAlpha//&#x586B;&#x5145;&#x900F;&#x660E;&#x5EA6;
    fillColor //&#x586B;&#x5145;&#x989C;&#x8272;
    strokeColor//&#x7EBF;&#x6761;&#x989C;&#x8272; 
    pathData //path&#x6307;&#x4EE4;
    strokeWidth//&#x7EBF;&#x6761;&#x5BBD;&#x5EA6;
</code></pre>
<h2 id="vector-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;"><a name="vector-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;" class="anchor-navigation-ex-anchor" href="#vector-&#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;"><i class="fa fa-link" aria-hidden="true"></i></a>6.2. vector &#x7ED8;&#x5236;&#x4E0D;&#x89C4;&#x5219;&#x56FE;&#x5F62;</h2>
<p><a href="https://github.com/hnyer/RegionDetector" target="_blank">https://github.com/hnyer/RegionDetector</a>
<img src="../pics/vector_demo.png" alt=""></p>
<h1 id="&#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x5DE5;&#x5177;"><a name="&#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x5DE5;&#x5177;" class="anchor-navigation-ex-anchor" href="#&#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x5DE5;&#x5177;"><i class="fa fa-link" aria-hidden="true"></i></a>7. &#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x5DE5;&#x5177;</h1>
<h2 id="glide-&#x5728;&#x7EBF;&#x6587;&#x6863;"><a name="glide-&#x5728;&#x7EBF;&#x6587;&#x6863;" class="anchor-navigation-ex-anchor" href="#glide-&#x5728;&#x7EBF;&#x6587;&#x6863;"><i class="fa fa-link" aria-hidden="true"></i></a>7.1. Glide &#x5728;&#x7EBF;&#x6587;&#x6863;</h2>
<p><a href="https://muyangmin.github.io/glide-docs-cn/doc/download-setup.html" target="_blank">https://muyangmin.github.io/glide-docs-cn/doc/download-setup.html</a></p>
<h2 id="glide-&#x4F18;&#x70B9;"><a name="glide-&#x4F18;&#x70B9;" class="anchor-navigation-ex-anchor" href="#glide-&#x4F18;&#x70B9;"><i class="fa fa-link" aria-hidden="true"></i></a>7.2. Glide &#x4F18;&#x70B9;</h2>
<pre><code class="lang-text">https://github.com/bumptech/glide
Glide &#x53EF;&#x4EE5;&#x8BBE;&#x7F6E; &#x6700;&#x5927;&#x5185;&#x5B58;&#x7F13;&#x5B58;&#x7A7A;&#x95F4;&#x5927;&#x5C0F;&#x3001;&#x6700;&#x5927;&#x78C1;&#x76D8;&#x7F13;&#x5B58;&#x7A7A;&#x95F4;&#x5927;&#x5C0F;&#x3001; &#x7F13;&#x5B58;&#x5931;&#x6548;&#x65F6;&#x95F4;&#x3002;

1&#x3001;Glide.with(xxx)&#x65B9;&#x6CD5; &#x63A5;&#x53D7; Context&#x3001;Activity &#x3001; Fragment &#x3002;
&#x5EFA;&#x8BAE;&#x4F7F;&#x7528;&#x540E;&#x9762;&#x4E24;&#x4E2A;&#x3002;&#x56E0;&#x4E3A;&#x56FE;&#x7247;&#x52A0;&#x8F7D;&#x4F1A;&#x548C;Activity &#x3001;Fragment&#x7684;&#x751F;&#x547D;&#x5468;&#x671F;&#x4FDD;&#x6301;&#x4E00;&#x81F4;&#x3002;
2&#x3001;&#x652F;&#x6301;&#x52A0;&#x8F7D; gif &#x683C;&#x5F0F;&#x3002;
</code></pre>
<h2 id="glide3x-&#x4F7F;&#x7528;"><a name="glide3x-&#x4F7F;&#x7528;" class="anchor-navigation-ex-anchor" href="#glide3x-&#x4F7F;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>7.3. Glide3.x &#x4F7F;&#x7528;</h2>
<pre><code class="lang-text">RequestOptions requestOptions = new RequestOptions()
         .placeholder(R.mipmap.icon_us)
         //.diskCacheStrategy(DiskCacheStrategy.NONE)
         //.skipMemoryCache(true)
         // &#x7F13;&#x5B58;&#x5931;&#x6548;&#x7B56;&#x7565; &#xFF0C;key &#x4E0D;&#x4E00;&#x6837; &#x7F13;&#x5B58;&#x5C31;&#x4F1A;&#x5931;&#x6548;
         .apply(RequestOptions.signatureOf(new ObjectKey(getSignatureKey())))
         .error(R.mipmap.icon_us);

 Glide.with(activity)
         // &#x6839;&#x636E;&#x8DEF;&#x5F84;&#x3001;File &#x52A0;&#x8F7D;
         .load(filePath)
         .apply(requestOptions)
         .into(userImg);

private long   getSignatureKey()  {
   ///long key = System.currentTimeMillis() / INVALID_TIME
   long key = System.currentTimeMillis()  ;
   return key ;
}

// &#x5F53;&#x901A;&#x8FC7;get&#x8BBF;&#x95EE;&#x63A5;&#x53E3; &#xFF0C;&#x76F4;&#x63A5;&#x8FD4;&#x56DE;&#x56FE;&#x7247;&#x6D41;&#x7684;&#x65F6;&#x5019;&#x3002; &#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x52A0;&#x8F7D;&#x8FD9;&#x4E2A;&#x63A5;&#x53E3;&#x4E5F;&#x53EF;&#x4EE5;&#x663E;&#x793A;&#x3002;
// &#x4E0D;&#x9700;&#x8981;&#x53BB;&#x52A0;&#x8F7D;&#x63A5;&#x53E3;&#x8FD4;&#x56DE;&#x7684;&#x503C;&#x3002;
</code></pre>
<h2 id="glide-4x-&#x7684;&#x53D8;&#x5316;"><a name="glide-4x-&#x7684;&#x53D8;&#x5316;" class="anchor-navigation-ex-anchor" href="#glide-4x-&#x7684;&#x53D8;&#x5316;"><i class="fa fa-link" aria-hidden="true"></i></a>7.4. glide 4.x &#x7684;&#x53D8;&#x5316;</h2>
<p>glide4.x &#x548C; glide3.x &#x7684;api &#x6709;&#x4E00;&#x4E9B;&#x53D8;&#x5316;&#x3002;</p>
<pre><code class="lang-text">/** The default value for DecodeFormat. */
public static final DecodeFormat DEFAULT = PREFER_ARGB_8888;
glide4.x &#x9ED8;&#x8BA4;&#x52A0;&#x8F7D;&#x683C;&#x5F0F; &#x662F; PREFER_ARGB_8888 &#x3002;
glide3.x &#x7684;&#x9ED8;&#x8BA4;&#x683C;&#x5F0F;&#x8C8C;&#x4F3C;&#x662F; 565&#xFF0C;&#x5982;&#x679C;&#x9047;&#x5230;&#x4E00;&#x4E9B; &#x5E26;&#x6709;&#x900F;&#x660E;&#x5EA6;&#x7684;&#x56FE;&#x7247;&#x5BFC;&#x81F4;&#x6548;&#x679C;&#x4E0D;&#x5BF9;&#x7684;&#x65F6;&#x5019;&#xFF0C;
&#x8BBE;&#x7F6E;&#x4E00;&#x4E0B;&#x52A0;&#x8F7D;&#x683C;&#x5F0F;&#x5C31;&#x884C;&#x4E86;&#x3002;

// &#x8BBE;&#x7F6E;&#x81EA;&#x5B9A;&#x4E49;&#x7F13;&#x5B58;&#x7B7E;&#x540D;
&#x8BF7;&#x53C2;&#x8003; AivinReader &#x4E2D;&#x7684;&#x4EE3;&#x7801; 
 Glide.with(activity)
    .asGif()
    .signature(new MySignature( imageUrl )) // &#x4F20;&#x5165;&#x81EA;&#x5B9A;&#x4E49;&#x7B7E;&#x540D;

// &#x83B7;&#x53D6;&#x7F13;&#x5B58;&#x7684;&#x540D;&#x5B57; &#xFF08;glide &#x751F;&#x6210;&#x7F13;&#x5B58;&#x7684;&#x65F6;&#x5019;&#x4E5F;&#x4F7F;&#x7528;&#x7684; SHA-256 &#x65B9;&#x6CD5;&#xFF1F; &#x6CA1;&#x770B;&#x6E90;&#x7801;&#xFF0C;&#x731C;&#x6D4B;&#x7684; &#xFF09;    
public String getSafeKey(Key key) {
    String safeKey= System.currentTimeMillis()+&quot;&quot;;
    MessageDigest messageDigest = MessageDigest.getInstance(&quot;SHA-256&quot;);
    key.updateDiskCacheKey(messageDigest);
    safeKey = Util.sha256BytesToHex(messageDigest.digest());
    return safeKey;
}

// &#x914D;&#x7F6E;&#x7F13;&#x5B58;&#x5730;&#x5740;
/**
 * &#x8FD9;&#x4E2A;&#x7C7B;&#x4E0D;&#x8981;&#x5220;&#x9664; &#xFF0C;&#x901A;&#x8FC7; &#x6CE8;&#x89E3;&#x7684;&#x65B9;&#x5F0F;&#x7ED9; Glide &#x8BBE;&#x7F6E; &#x7F13;&#x5B58;&#x8DEF;&#x5F84;&#x7B49;&#x7684;&#x3002; &#x5426;&#x5219;&#x4F1A;&#x4F7F;&#x7528;&#x9ED8;&#x8BA4;&#x8DEF;&#x5F84;&#x3002;
 */
@GlideModule
public class MyGlide extends AppGlideModule {
    public static String diskCachePath =null ;
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        int diskCacheSizeBytes = 1024 * 1024 * 100;
        appRootPath = context.getCacheDir().getPath();
        diskCachePath = getStorageDirectory();
        builder.setDiskCache( new DiskLruCacheFactory( diskCachePath, diskCacheSizeBytes )  );

    }
    private String sdRootPath = Environment.getExternalStorageDirectory().getPath();
    private String appRootPath = null;
    private String getStorageDirectory() {
        String path = Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) ?
                sdRootPath : appRootPath;
         path+= &quot;/z_wkReaderGlideDisk123456&quot; ;
         return path ;
    }
}

// &#x6839;&#x636E;&#x7B7E;&#x540D;&#x83B7;&#x53D6;sd&#x4E2D;&#x7684;&#x7F13;&#x5B58;
public static File getGlideCacheFile(Context context, String url) {
    MySignature mySignature = new MySignature(url);
    String safeKey = new SafeKeyGenerator().getSafeKey( mySignature);
    File file = new File(MyGlide.diskCachePath);// &#x6CE8;&#x610F;&#x6B64;&#x5904;&#x7F13;&#x5B58;&#x7684;&#x8DEF;&#x5F84;&#x8981;&#x8DDF; glide &#x8BBE;&#x7F6E;&#x7684;&#x7F13;&#x5B58;&#x8DEF;&#x5F84;&#x4E00;&#x81F4;
    DiskLruCache diskLruCache = DiskLruCache.open(file, 1, 1, DiskCache.Factory.DEFAULT_DISK_CACHE_SIZE);
    DiskLruCache.Value value = diskLruCache.get(safeKey);
    if (value != null) {
        return value.getFile(0);
    }
    return null;
}

// &#x7F13;&#x5B58;&#x7684;&#x751F;&#x6548;&#x65F6;&#x95F4;&#x8BBE;&#x7F6E;
&#x8C8C;&#x4F3C;&#x662F;&#x6CA1;&#x6709;api&#x76F4;&#x63A5;&#x8BBE;&#x7F6E;&#x7684;
&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x7B7E;&#x540D;&#x7684;&#x65B9;&#x5F0F;&#x81EA;&#x5DF1;&#x53BB;&#x5224;&#x65AD;&#xFF0C;&#x5982;&#x679C;&#x8D85;&#x8FC7;&#x4E00;&#x5B9A;&#x65F6;&#x95F4;&#xFF0C;
&#x5C31;&#x8BA9;&#x7B7E;&#x540D;&#x53D8;&#x5316;&#x5373;&#x53EF;&#x3002;
</code></pre>
<h1 id="gif-&#x52A0;&#x8F7D;"><a name="gif-&#x52A0;&#x8F7D;" class="anchor-navigation-ex-anchor" href="#gif-&#x52A0;&#x8F7D;"><i class="fa fa-link" aria-hidden="true"></i></a>8. gif &#x52A0;&#x8F7D;</h1>
<pre><code class="lang-text">1&#x3001;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; Glide &#x6765;&#x52A0;&#x8F7D;&#x3002;
2&#x3001;&#x5176;&#x4ED6;&#x4E00;&#x4E9B;&#x7B2C;&#x4E09;&#x65B9;&#x5E93;&#x3002;https://github.com/koral--/android-gif-drawable
&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5728; xml &#x4E2D;&#x914D;&#x7F6E;gif&#xFF0C; &#x65E0;&#x9700;&#x5199;Java&#x4EE3;&#x7801;&#xFF0C;&#x6BD4;&#x8F83;&#x65B9;&#x4FBF;&#x3002;
</code></pre>
<h1 id="&#x7CFB;&#x7EDF;&#x76F8;&#x518C;"><a name="&#x7CFB;&#x7EDF;&#x76F8;&#x518C;" class="anchor-navigation-ex-anchor" href="#&#x7CFB;&#x7EDF;&#x76F8;&#x518C;"><i class="fa fa-link" aria-hidden="true"></i></a>9. &#x7CFB;&#x7EDF;&#x76F8;&#x518C;</h1>
<p>&#x4ECE; 7.0 &#x5F00;&#x59CB; &#xFF0C;&#x5F53;&#x6211;&#x4EEC;&#x6253;&#x5F00;&#x76F8;&#x673A;&#x7B49;&#x78B0;&#x5230;&#x8FD9;&#x79CD;&#x5D29;&#x6E83;&#x95EE;&#x9898;&#xFF0C;&#x5B98;&#x65B9;&#x63A8;&#x8350;&#x6211;&#x4EEC;&#x4F7F;&#x7528; FileProvide &#x3002;
&#x9700;&#x8981;&#x9009;&#x62E9;&#x914D;&#x7F6E; provider</p>
<pre><code class="lang-text">&lt;provider
    android:name=&quot;.provider.ImagePickerProvider&quot;
    android:authorities=&quot;${applicationId}.imagePickerProvider&quot;
    android:exported=&quot;false&quot;
    android:grantUriPermissions=&quot;true&quot;&gt;
    &lt;meta-data
        android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
        android:resource=&quot;@xml/image_picker&quot; /&gt;
&lt;/provider&gt;

&lt;paths xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
    &lt;external-path
        name=&quot;external&quot;
        path=&quot;.&quot; /&gt;

    &lt;external-files-path
        name=&quot;external_files&quot;
        path=&quot;.&quot; /&gt;

    &lt;cache-path
        name=&quot;cache&quot;
        path=&quot;.&quot; /&gt;

    &lt;external-cache-path
        name=&quot;external_cache&quot;
        path=&quot;.&quot; /&gt;

    &lt;files-path
        name=&quot;files&quot;
        path=&quot;.&quot; /&gt;

    &lt;files-path
        name=&quot;DCIM&quot;
        path=&quot;.&quot; /&gt;

    &lt;external-path
        name=&quot;images3&quot;
        path=&quot;Pictures3&quot; /&gt;
&lt;/paths&gt;
</code></pre>
<footer class="page-footer"><span class="copyright">( no Copyright&#xFF0C;enjoy youself ! ) all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">The file was updated at :
2022-04-04 10:49:02
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="屏幕适配.html" class="navigation navigation-prev " aria-label="Previous page: 屏幕适配">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="WebView详解.html" class="navigation navigation-next " aria-label="Next page: WebView详解">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"图片加载详解","level":"1.12.20","depth":2,"next":{"title":"WebView详解","level":"1.12.21","depth":2,"path":"chinese/android基础/WebView详解.md","ref":"chinese/android基础/WebView详解.md","articles":[]},"previous":{"title":"屏幕适配","level":"1.12.19","depth":2,"path":"chinese/android基础/屏幕适配.md","ref":"chinese/android基础/屏幕适配.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-search","search-plus","todo","anchor-navigation-ex","copy-code-button","fontsettings","tbfed-pagefooter","local-video","splitter","expandable-chapters","favicon","theme-comscore","local-video"],"styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"( no Copyright，enjoy youself ! )","modify_label":"The file was updated at :","modify_format":"YYYY-MM-DD HH:mm:ss"},"todo":{},"splitter":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"family":"sans","size":2,"theme":"white"},"highlight":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":true,"showLevel":true},"favicon":{"shortcut":"assets/images/favicon.ico","bookmark":"assets/images/favicon.ico"},"theme-comscore":{},"local-video":{},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"Aivin","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Aivin开发笔记","language":"zh-hans","gitbook":"*","description":"Aivin开发笔记"},"file":{"path":"chinese/android基础/图片加载详解.md","mtime":"2022-04-04T02:49:02.752Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-04-04T03:47:09.782Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-local-video/video.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

